<%@taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
<%@taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tld/displaytag-11.tld" prefix="display" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<bean:define id="bean" name="FormularioEmergenciaForm" property="bean"/>
<bean:define id="lista" name="FormularioEmergenciaForm" property="lista"/>
<bean:define id="unidadOperativa" name="UnidadOperativaBean" scope="session"></bean:define>
<bean:define id="actividad" name="ActividadBean" scope="session"></bean:define>
<bean:define id="usuario" name="UsuarioBean" scope="session"></bean:define>
<html:html>
	<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta http-equiv="Pragma" content="no-cache">
    <title>Registrar de Formulario</title>
    <script src="include/js/general.js"></script>
    <script language="JavaScript" src="include/js/valida.js"></script>
    <link href="include/css/estilos.css" type="text/css" rel="stylesheet">
	<script type="text/javascript">
		function cancelar(){
			doMethod("inicio");
		}
		function generaMesaPartes(){
			doMethod("generarMesaParte");
		}
	</script>
</head>

<body bgcolor="#EEEEEE" bottommargin="0" leftmargin="0" rightmargin="0" topmargin="0">
	<iframe name="ifrmCabecera" width="100%" height="125" scrolling="no" marginheight="0" align="center" frameborder="0" src="cabecera.jsp"></iframe>	
		<html:form action="formuEmergencia">
		<input type="hidden" name="method"/>
		<table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
			<tr class="campos"> 
				<td align="center" colspan="4"><p class="subtitulo1" ><c:out value="${bean.formulario.nmbre}"></c:out> </p></td>
			</tr>
			<tr> 
				<td height="20" colspan="2"></td>
			</tr>		
		 </table>
		<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
		<tr class="campos">
			<td height="20" ><b>N&uacute;mero Emergencia :</b></td>
			<td height="20">
			<b><c:out value="${bean.nmroEmrgncia}"></c:out></b>
			</td>
		</tr>
		<tr class="campos">
		 	<td height="20"><span>C&oacute;digo Osinerg :</span></td>
		 	<td>
				<div><span><b><c:out value="${unidadOperativa.codigoOsinerg}"></c:out></b></span></div>
			</td>
		</tr>
		<tr class="campos">
			<td width="20%" height="20"><span>Tipo de Emergencia :</span></td>
			<td>
				<div><b><bean:write name="TipoEmergencia" scope="session" property="${bean.formulario.tpoEmrgncia}"/></b></div>
			</td>
		</tr>				
		<tr class="campos">
			<td height="20" >Actividad :</td>
			<td height="20">
			<b>${actividad.descripcion}</b>
			</td>
		</tr>
		<tr class="campos">
			<td height="20" >Raz&oacute;n Social :</td>
			<td height="20">
			<b>${unidadOperativa.nombreComercial}</b>
			</td>
		</tr>
		
		<tr>
			<td colspan="2">
			<bean:define id="mapa" name="FormularioEmergenciaForm" property="mapa"/>
			<logic:notEmpty name="mapa" property="listaCategorias">

				<table width="100%" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td colspan="5" height="25"></td>						
					</tr>
			
			<logic:notEmpty name="mapa" property="listaCategorias">
			<logic:iterate id="categorias" name="mapa" property="listaCategorias">
				<tr>
					<td style="padding-top: 10px;" colspan="5"><span class="subtitulo1"><b><c:out value="${categorias.DSCRPCION}"/></b></span></td>
				</tr>
				<logic:present name="mapa" property="CAT_${categorias.ID}">
					<logic:iterate id="secciones" name="mapa" property="CAT_${categorias.ID}">
						
	
							<tr style="padding-top: 2px;">
								<td class="campos" width="30%" style="padding-left: 25px;"><c:out value="${secciones.DSCRPCION}"></c:out> :</td>
								<td colspan="4" class="campos"><c:out value="${secciones.RESPUESTA}"></c:out></td>
							</tr>

						
					</logic:iterate>
				</logic:present>
				</logic:iterate>
			</logic:notEmpty>
				<tr>
					<td height="20" colspan="5">&nbsp;</td>
				</tr>
				<tr>
					<td height="20" colspan="5">&nbsp;</td>
				</tr>
				<tr>
					<td align="center" colspan="5">
						<input type="button" value="Volver" onclick="cancelar()" class="botones">
						<c:if test="${flagConstancia}">
						 <script type="text/javascript">
						 	var ruta = "<%=request.getContextPath()%>"+"/formuEmergencia.do?method=generarMesaParte";
						 	window.open(ruta,"constancia","menubar=no,toolbar=no,resizable=yes");
						 </script>
						 <!-- <input name="Submit" type="button" class="botones" value="Imprimir" onclick="javascript:generaMesaPartes();"> -->
						</c:if>
					</td>
				</tr>
			
				</table>
	
			</logic:notEmpty>
			</td>
			</tr>
		</table>
	</html:form>
</body>
</html:html>
